import OmitLine from "@/components/OmitLine/OmitLine";
import ResultCard from "./components/ResultCard/ResultCard";
import Service from "./Service";
import style from "./style.module.css";
import { MySelect } from "./styled";
const {Option}=MySelect;
export default class ResultAnnouncement extends Service{
   
    render = () => {
        let {resultData} =this.state;
    
        return (
            <div className={style.ResultAnnouncement}>
                <div className={style.header}>
                <MySelect onChange={(value:any)=>{
                    this.setState({
                        chooseId:value
                    })
                }} defaultValue={"农贸市场、专业市场“五化”改造提升项目"} style={{ width: 120 }}>
                    {
                       resultData.list?.map((item,index)=><Option key={index} value={item.id}>{item.name}</Option>)
                    }
                </MySelect>
                </div>
                <div className={style.contents}>
                    {
                        resultData.list?.map((item:any,index:number)=>{
                            if(this.state.chooseId == item.id){
                             return  item.list.map((item1:any,index1:number)=>{
                                return  <ResultCard key={index1} data={item1} />
                               })
                            }
                        })
                    }
                </div>
            </div>
        )
    }
}